package core.tool.bpe;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import core.tool.bpe.action.StartAction;
import core.tool.common.SystemInfo;
import core.tool.log.log4j.EasyLogger;

//D:\myJavaWorkSpace\JavaHi\WebRoot\attached\buildingsnake.xml
public class Main {

	public static void main(String[] args) {
		try{
			String s="";
			System.out.println("请输入xml路径：");
			InputStreamReader is_reader=new InputStreamReader(System.in);
			while((s=new BufferedReader(is_reader).readLine())!="#") {
				if("1".equals(s)) s="D:/myJavaWorkSpace/JavaHi/WebRoot/attached/buildingsnake.xml";
				EasyLogger.init(SystemInfo.ROOT_PATH);
				String filePath=s;
				Action startAction=new StartAction();
				BpeContext bpeContext=new BpeContext(filePath);
				startAction.executeAction(bpeContext);	
				System.out.println("请输入xml路径：");
			}
		}catch(IOException e) {
			
		}	
//		EasyLogger.init(SystemInfo.ROOT_PATH);
//		String filePath=args[0];
//		Action startAction=new StartAction();
//		BpeContext bpeContext=new BpeContext(filePath);
//		startAction.executeAction(bpeContext);
	}
}
